package deletepackage;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

public class Deletesch extends Delete{
    public void deleteDB(int schNO){
        Connection conn = null;
        PreparedStatement pstmt = null;
        
        try {
            conn = getConnection();
            
            pstmt = conn.prepareStatement(
            	"delete from SCHEDULE where schNO=?");
            pstmt.setInt(1, schNO);
            
            pstmt.executeUpdate();
        } catch(SQLException ex) {
            //throw new ScheduleManagerException("deleteSchedule", ex);
        } finally {
            if (pstmt != null) try { pstmt.close(); } catch(SQLException ex) {}
            if (conn != null) try { conn.close(); } catch(SQLException ex) {}
        }
    }
}